#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
#include<assert.h>
char* my_strcpy(char* dest,const char* src)
{
	assert(dest && src);
	char* start = dest;
	/*while (*src != '\0')
	{
	
		*dest = *src;
		dest++;
		src++;
	}
	*dest = *src;*/
	/*while (*dest++ = *src++)
	{
		;
	}*/
	while (*src != '\0')
	{
		*dest++ = *src++;
	}
	
	return start;
}
int main()
{
	char arr1[] = "hello world";
	char arr2[20] = { 0 };
	my_strcpy(arr2, arr1);
	printf("%s\n", arr2);
	char* ret = my_strcpy(arr2, arr1);
	printf("%s\n", ret);
	printf("%s\n", my_strcpy(arr2, arr1));
	return 0;
}
